# http://docs.python.org/library/tarfile.html

import tarfile
import sys

def main(inpfile):

    tar = tarfile.open(inpfile, "r:gz")

    for tarinfo in tar:
        print tarinfo.name, "\t", tarinfo.size, "\t",
        if tarinfo.isreg():
            print "is a regular file."
        elif tarinfo.isdir():
            print "is a directory."
        else:
            print "is something else."

    tar.close()

if __name__ == '__main__':
    ''' '''
    main(sys.argv[1])
